<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterTableSignOrderAddColumns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_sign_order', function (Blueprint $table) {
            $table->unsignedTinyInteger('contractStatus')->default(1)->comment("合同状态 0 - 变更中 1 - 正常");
            $table->unsignedTinyInteger('dissolveStatus')->default(0)->comment("解除合同状态 0 - 正常 1 - 解除 2 - 闭店");
            $table->string('invalidedReason')->default("")->comment('作废原因');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_sign_order', function (Blueprint $table) {
            $table->dropColumn('contractStatus');
            $table->dropColumn('dissolveStatus');
            $table->dropColumn('invalidedReason');
        });
    }
}
